package string;

public class StartAndEndDemo {
    public static void main(String[] args) {
        String ur1 = "www.baidu.com";
        boolean f=ur1.startsWith("www");
        System.out.println(f);
        f=ur1.startsWith("http:");
        System.out.println(f);
        f=ur1.endsWith(".com");
        System.out.println(f);
        f=ur1.endsWith(".cn");
        System.out.println(f);
    }
}
